﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using ArchivesAdmin.Admin.Web.Controllers;
using ArchivesAdmin.Business.DataManage; 
using ArchivesAdmin.Model.Param.TrainingManage;
using ArchivesAdmin.Util.Model;
using ArchivesAdmin.Web.Code;
using Microsoft.AspNetCore.Mvc;

namespace ArchivesAdmin.Admin.Web.Areas.ArchiveManage.Controllers
{
    [Area("ArchiveManage")]
    public class ArchiveController : BaseController
    {
        private AjbxxbBLL ajbxxbBLL = new AjbxxbBLL();

        #region 视图功能
        //[AuthorizeFilter("Training:teacher:view")]
        public IActionResult Index(int id)
        {
            string flag = "";
            switch (id)
            {
                case 1: flag = "规划档案"; break;
                case 2: flag = "国土档案"; break;
                case 3: flag = "房屋档案"; break;
                case 4: flag = "文书档案"; break;
                case 5: flag = "物业档案"; break;
                case 6: flag = "园区档案"; break;
                case 7: flag = "招投标档案"; break;
            }
            ViewBag.ArchiveCategory = flag;

            return View();
        }

        public IActionResult TeacherDetail()
        {
            return View();
        }

        public async Task<IActionResult> TeacherForm()
        {
            ViewBag.OperatorInfo = await Operator.Instance.Current();
            return View();
        }
        #endregion

        #region 获取数据
        //[HttpGet]
        //[AuthorizeFilter("Training:teacher:search")]
        //public async Task<IActionResult> GetListJson(TeacherListParam param)
        //{
        //    TData<List<TeacherEntity>> obj = await teacherBLL.GetList(param);
        //    return Json(obj);
        //}

        //[HttpGet]
        ////[AuthorizeFilter("Training:teacher:search")]
        //public async Task<IActionResult> GetPageListJson(TeacherListParam param, Pagination pagination)
        //{
        //    TData<List<TeacherEntity>> obj = await teacherBLL.GetPageList(param, pagination);
        //    return Json(obj);
        //}

        //[HttpGet]
        //public async Task<IActionResult> GetFormJson(long id)
        //{
        //    TData<TeacherEntity> obj = await teacherBLL.GetEntity(id);
        //    return Json(obj);
        //}
 
        #endregion

        #region 提交数据
        //[HttpPost]
        //[AuthorizeFilter("archive:archive:add")]
        //public async Task<IActionResult> SaveFormJson(TeacherEntity entity)
        //{
        //    TData<string> obj = await teacherBLL.SaveForm(entity);
        //    return Json(obj);
        //}

        //[HttpPost]
        //[AuthorizeFilter("training:teacher:delete")]
        //public async Task<IActionResult> DeleteFormJson(string ids)
        //{
        //    TData obj = await teacherBLL.DeleteForm(ids);
        //    return Json(obj);
        //}
          
        #endregion

    }
     
}